import java.awt.*;
import javax.swing.*;
import java.util.Scanner;

public class ColoredRectangleTest {

	
	public static void main(String[] args) {

		Scanner keyboard=new Scanner(System.in);
		ColoredRectangle[] rectangles;
		
		System.out.println("How many rectangles will you be creating today?");
		int size=keyboard.nextInt();
		
		rectangles=new ColoredRectangle[size];
		
		JFrame window=new JFrame("Square Test");
		window.setSize(500, 500);
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		window.setVisible(true);
		
		for(int index=0; index<rectangles.length; index++){
			System.out.println("What is the x coordinate for your upper left point?");
			int xCord=keyboard.nextInt();
			System.out.println("What is the  coordinate for your upper left point?");
			int yCord=keyboard.nextInt();
			System.out.println("What is the length of you rectangle?");
			int length=keyboard.nextInt();
			System.out.println("What is the width of you rectangle?");
			int width=keyboard.nextInt();
			
			ColoredRectangle temp=new ColoredRectangle(xCord, yCord, length, width );
			rectangles[index]=temp;
			
			Graphics g=window.getGraphics();
			rectangles[index].drawGraphics(g);
			
			
			
		}
		
	
		

	}

}
